                <div id="content" class="span10">
                    <!-- content starts -->
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <?php if(!empty($detail)){
                                    foreach ($detail as $row){
                                    ?>
                                <form class="form-horizontal" action="<?php echo base_url();?>bara/update" method="post">
                                  <fieldset>
                                    <legend>Edit Data Karyawan</legend>
                                    <div class="row-fluid">
                                        <div class="span6">
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">No Karyawan</label>
                                                <div class="controls">
                                                    <input type="hidden" class="span6 typeahead" id="typeahead" name="nama_karyawan" id="id_karyawan" value="<?=$row['id_karyawan']?>">
                                                    <input type="text" class="span8 typeahead" name="id_karyawan" id="id_karyawan" readonly="true" value="<?=$row['id_karyawan']?>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nama Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nama" id="nama" value="<?=$row['nama']?>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Identitas</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="identitas" id="identitas" value="<?=$row['identitas']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Alamat</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="alamat" id="alamat" value="<?=$row['alamat']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kecamatan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="kecamatan" id="kecamatan" value="<?=$row['kecamatan']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kota</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="kota" id="kota" value="<?=$row['kota']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Telephone</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="telp" id="telp" value="<?=$row['telp']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Tanggal Masuk</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="tanggal_masuk" id="tanggal_masuk" value="<?=$row['tanggal_masuk']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Jabatan Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="jabatan" id="jabatan" value="<?=$row['jabatan']?>">
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kantor Cabang</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="cabang" id="cabang" value="<?=$row['cabang']?>">
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Username</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="username" id="username" value="<?=$row['username']?>">
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Password</label>
                                                <div class="controls">
                                                    <input type="password" readonly="true" name="password" id="password" value="<?=$row['password']?>">
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Role</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="role" id="role" value="<?=$row['role']?>">
                                                </div>
                                            </div>
                                        </div>
                                        
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <a type="reset" class="btn" href="<?php echo base_url() ?>bara">Cancel</a>
                                    </div>
                                    </fieldset>
                                </form>
								
                                <?php }}else {?>
                                
								<form class="form-horizontal" action="<?php echo base_url();?>bara/insert" method="post">
                                  <fieldset>
                                    <legend> Karyawan Baru</legend>
                                    <?php if(empty($error)){}else{?>
                                    <div class="alert alert-warning alert-dismissible" role="alert">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only"></span></button>
                                        <strong>Peringatan!</strong> No Karyawan sudah ada
                                    </div>
                                    <?php } ?>
                                    <div class="row-fluid">
                                        <div class="span6">
                                         <div class="control-group">
                                                <label class="control-label" for="typeahead">No Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="id_karyawan" id="id_karyawan" >
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nama Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nama" id="nama" >
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Kartu Identitas</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="identitas" id="identitas" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Alamat</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="alamat" id="alamat" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kecamatan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="kecamatan" id="kecamatan" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kota</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="kota" id="kota" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Telephone</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="telp" id="telp" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Tanggal Masuk</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="tanggal_masuk" id="tanggal_masuk" >

                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Jabatan Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="jabatan" id="jabatan" >
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kantor Cabang</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="cabang" id="cabang" >
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Username</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="username" id="username" >
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Password</label>
                                                <div class="controls">
                                                    <input type="password" class="span8 typeahead" name="password" id="password" >
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Role</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="role" id="role" >
                                                </div>
                                            </div>   
                                        </div>
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <button type="reset" class="btn">Cancel</button>
                                    </div>
                                    </fieldset>
                                </form>
								
                                <?php } ?>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
					
                    <?php
                    if (empty($karyawan)){
                        echo "Maaf, untuk saat ini data tidak ada";
                    } 
                    else {
                    
                    ?>
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <table class="table table-striped table-bordered bootstrap-datatable datatable">
                                    <thead>
                                        <tr>
                                            <th>No Karyawan</th>
                                            <th>Nama Karyawan</th>
                                            <th>Kartu Identitas</th>
                                            <th>Alamat</th>
                                            <th>Kecamatan</th>
                                            <th>Kota</th>
											<th>Telephone</th>
                                            <th>Tanggal Masuk</th>
											<th>Jabatan</th>
											<th>Kantor Cabang</th>
											<th>Username</th>
										
											<th>Role</th>
											
                                        </tr>
                                    </thead>
                                    
                                    <tbody>
                                        <?php
                                    foreach ($karyawan as $row) {
                                    ?>
                                        <tr>
                                            <td><?=$row['id_karyawan']?></td>
                                            <td><?=$row['nama']?></td>
                                            <td><?=$row['identitas']?></td>
                                            <td><?=$row['alamat']?></td>
                                            <td><?=$row['kecamatan']?></td>
											<td><?=$row['kota']?></td>
											<td><?=$row['telp']?></td>
                                            <td><?=$row['tanggal_masuk']?></td>
											<td><?=$row['jabatan']?></td>
											<td><?=$row['cabang']?></td>
											<td><?=$row['username']?></td>
											
											<td><?=$row['role']?></td>
											
                                            <td class="center">
                                                <a class="btn btn-info" href="<?php echo base_url()?>bara/edit/<?=$row['id_karyawan']?>">
                                                    <i class="icon-edit icon-white"></i>  
                                                    Edit                                            
                                                </a>
                                                <a class="btn btn-danger" href="<?php echo base_url()?>bara/delete/<?=$row['id_karyawan']?>">
                                                    <i class="icon-trash icon-white"></i> 
                                                    Delete
                                                </a>
                                            </td>
                                        </tr>
                                        <?php
                                        } 
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
                    <?php 
                }
                    ?>
                    <!--/row-->
                    <!-- content ends -->
                </div>
                <!--/#content.span10-->
